import requests
import json


def main():
    input_json = {'question': '凯迪拉克'}
    input_json1 = json.dumps(input_json)
    response = requests.post(url='http://192.168.2.53:32436/langchain_chatchat', data=input_json1)
    a = response.text
    print(a)


def pord():
    input_json = {'question': '凯迪拉克和底特律的关系'}
    input_json1 = json.dumps(input_json)
    response = requests.post(url='http://192.168.0.156:8089/langchain_chatchat', data=input_json1)
    a = response.text
    print(a)

def test():
    input_json = [{'role': 'user', 'content': 'XT5安全性怎么样？'},
                  {'role': 'assistant', 'content': 'XT5的安全性能较好。'},
                  {'role': 'user', 'content': '有什么安全配置'}]
    input_json1 = json.dumps(input_json)
    response = requests.post(url='http://114.55.3.223:30018/unicdata_gpt', data=input_json1)
    a = response.text
    print(a)


if __name__ == '__main__':
    test()
